<{include file="top.html" }>
</head>
<body>
    <div class="bgcolor"></div>
	<div class="content">
        <header><a class="left_link" href="javascript:void(0);"></a>参与者</header>
        <ul class="get_praise praise-comment">
        </ul>
    </div>
    <{include file="signBody.html"}>
</body>
</html>
<script src="<{$preStaticUrl}>Wap/js/flexible.js?v=<{$resVersion}>"></script>
<script>

    var id="<{$objID}>";
    var loadGif = "<{$preStaticUrl}>Wap/images/load.gif";
    //拖动加载
    var flagData = true;
    var flagAjax = true;
    var page=1;

    function load_more(){
        $("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif") center center no-repeat;background-size:30px 30px;'});
        $("#load_more span").html('正在加载...');
        if(! flagAjax){
            return false;
        }
        flagAjax = false;

        $.getJSON("<{u('PointMall/memberListMore')}>", {page:page,id:id}, function(data){
            flagAjax = true;
            if(data.status!=0){
                flagData = false;
                $("#load_container").html('<a href="javascript:;" id="load_more"><span>没有更多啦</span></a>');
                $("#load_more").css({'background':'url("")'}).css({'padding-top':'0'}).css({'top':'-30px'}).css({'position':'relative'});
            } else {
                $(".praise-comment").append(data.dataHTML);
                fixUserHead();
                $("#load_more span").html('加载更多');
                page++;
                $("#load_more").css({'background':'url("'+loadGif+'") center center no-repeat;background-size:30px 30px;'});
                if(data.isPage == 0){
                    $("#load_container").html('<a href="javascript:;" id="load_more"><span>没有更多啦</span></a>');
                    $("#load_more").css({'background':'url("")'}).css({'padding-top':'0'}).css({'top':'-30px'}).css({'position':'relative'});
                    flagData = false;

                }
            }
        });
    }

    var tmp_scroll = 0;
    $(window).scroll(function () {
        if (tmp_scroll == $(window).height() + $(window).scrollTop()) {
            return;
        }
        tmp_scroll = $(window).height() + $(window).scrollTop();
        var jia_scroll = $(document).height() - ($(window).height() + $(window).scrollTop());
        if (jia_scroll < 100 && flagData) {

            load_more();
        }
    });
    load_more();

</script>

